<template>
	<div class="app-container">
		<div class="searchBox">
			<el-form :inline="true">
				<el-form-item label="查询条件1：">
					<el-input v-model="search.demo1" placeholder="请输入内容"></el-input>
				</el-form-item>
				<el-form-item label="查询条件2：">
					<el-input v-model="search.demo2" placeholder="请输入内容"></el-input>
				</el-form-item>

				<el-form-item>
					<el-button type="primary" @click="searchQuery">查询</el-button>
					<el-button type="info" @click="search = {}; searchQuery();">重置</el-button>
				</el-form-item>
			</el-form>
		</div>

		<qm-table ref="qmTable" :data="query" keyProp="date" :formValidate="defaultFormValidate" isCustomForm>
			<qm-table-column field="week" sortable="true">周的天 （0=星期日, 6=星期六）</qm-table-column>
			<qm-table-column field="users" sortable="true">访问页面用户数量</qm-table-column>
			<qm-table-column field="totalPages" sortable="true">访问页面总数</qm-table-column>
			<qm-table-column field="skimTimes" sortable="true">浏览时长总数</qm-table-column>
			<qm-table-column field="averagePages" sortable="true">人均访问页面数</qm-table-column>
			<qm-table-column field="averageTimes" sortable="true">人均访问页面时长</qm-table-column>

			<template v-slot:form="{ models, controlData, pageAction }">
				<create ref="create" :models="models" :controlData="controlData" :pageAction="pageAction"></create>
			</template>
		</qm-table>
	</div>
</template>

<script>
import Controller from "@/libs/framework/controller";
import Create from './create';
export default class Instance extends Controller {
	onBeforeInit() {
		this.urls = {
			model: "/mobile/mobileModuleActivity/getListModel",
			query: "/mobile/mobileModuleActivity/query",
			save: "/mobile/mobileModuleActivity/save",
			delete: "/mobile/mobileModuleActivity/delete",
			entity: "/mobile/mobileModuleActivity/getEntity",
		};
	}

	mixin() {
		return {
			components: {
				Create,
			},
			data() {
				return {};
			},
			methods: {},
		};
	}
}
</script>

<style scoped lang="scss">
</style>
